package tests;

import java.io.FileNotFoundException;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;

import model.TransitionSystem;

import org.w3c.dom.Document;

import utilities.DomTree;
import utilities.GraphCreator;
import utilities.XMLWriter;

/** Class for testing writing to XML file
 * @author DarkoLaptop2
 *
 */
public class XMLWriteTest {

	/** Main method
	 * @param args
	 * @throws ParserConfigurationException
	 * @throws TransformerException
	 * @throws FileNotFoundException
	 */
	public static void main(String[] args) throws ParserConfigurationException,
			TransformerException, FileNotFoundException {
		DomTree dt = new DomTree("src\\tests\\nedetermisticki1.jff");
		Document doc = dt.ParseXml();
		doc.getDocumentElement().normalize();
		TransitionSystem graph = GraphCreator
				.generateGraphWithoutVariables(doc);
		// create XML file from graph with name output.jff
		XMLWriter.writeXMLDocumentForSupervisor(graph, "output.jff");

	}

}
